/*
 * Copyright (c) 2017 xiaomaihd and/or its affiliates.All Rights Reserved.
 *            http://www.xiaomaihd.com
 */
package com.arkisv.common.conf;

import com.arkisv.common.interceptor.PageInterceptor;
import com.arkisv.common.util.Springfactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 拦截器filter配置
 * Created by fb on 2017/4/24.
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(Springfactory.getBeanForClass(PageInterceptor.class));
        super.addInterceptors(registry);
    }
}
